<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Qwt User&#39;s Guide: QwtSeriesData&lt; T &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Qwt User&#39;s Guide
   &#160;<span id="projectnumber">6.1.5</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('class_qwt_series_data.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_qwt_series_data-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">QwtSeriesData&lt; T &gt; Class Template Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Abstract interface for iterating over samples.  
 <a href="class_qwt_series_data.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="qwt__series__data_8h_source.html">qwt_series_data.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for QwtSeriesData&lt; T &gt;:</div>
<div class="dyncontent">
<div class="center"><img src="class_qwt_series_data__inherit__graph.png" border="0" usemap="#_qwt_series_data_3_01_t_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="_qwt_series_data_3_01_t_01_4_inherit__map" id="_qwt_series_data_3_01_t_01_4_inherit__map">
<area shape="rect" title="Abstract interface for iterating over samples." alt="" coords="21,5,168,32"/>
<area shape="rect" href="class_qwt_array_series_data.html" title="Template class for data, that is organized as QVector." alt="" coords="5,80,184,107"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a3f075340d18fb112a342d74716eb8d9c"><td class="memItemLeft" align="right" valign="top"><a id="a3f075340d18fb112a342d74716eb8d9c"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_series_data.html#a3f075340d18fb112a342d74716eb8d9c">QwtSeriesData</a> ()</td></tr>
<tr class="memdesc:a3f075340d18fb112a342d74716eb8d9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:a3f075340d18fb112a342d74716eb8d9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a841a56f909879d599a385b9c3d046745"><td class="memItemLeft" align="right" valign="top"><a id="a841a56f909879d599a385b9c3d046745"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_series_data.html#a841a56f909879d599a385b9c3d046745">~QwtSeriesData</a> ()</td></tr>
<tr class="memdesc:a841a56f909879d599a385b9c3d046745"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:a841a56f909879d599a385b9c3d046745"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3cfe5b26fc55a887ac85b0103ae80a3e"><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_series_data.html#a3cfe5b26fc55a887ac85b0103ae80a3e">size</a> () const =0</td></tr>
<tr class="separator:a3cfe5b26fc55a887ac85b0103ae80a3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae8650d16c07c58f01897ab48658a3266"><td class="memItemLeft" align="right" valign="top">virtual T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_series_data.html#ae8650d16c07c58f01897ab48658a3266">sample</a> (size_t i) const =0</td></tr>
<tr class="separator:ae8650d16c07c58f01897ab48658a3266"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aedb969ba51a27d88d26ad7f7cb1c2c7f"><td class="memItemLeft" align="right" valign="top">virtual QRectF&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_series_data.html#aedb969ba51a27d88d26ad7f7cb1c2c7f">boundingRect</a> () const =0</td></tr>
<tr class="separator:aedb969ba51a27d88d26ad7f7cb1c2c7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a391b4601a7454b2f9582fbc2662d108e"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_series_data.html#a391b4601a7454b2f9582fbc2662d108e">setRectOfInterest</a> (const QRectF &amp;rect)</td></tr>
<tr class="separator:a391b4601a7454b2f9582fbc2662d108e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a24fbbcb0baa0c728117d2e6764d00414"><td class="memItemLeft" align="right" valign="top"><a id="a24fbbcb0baa0c728117d2e6764d00414"></a>
QRectF&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_series_data.html#a24fbbcb0baa0c728117d2e6764d00414">d_boundingRect</a></td></tr>
<tr class="memdesc:a24fbbcb0baa0c728117d2e6764d00414"><td class="mdescLeft">&#160;</td><td class="mdescRight">Can be used to cache a calculated bounding rectangle. <br /></td></tr>
<tr class="separator:a24fbbcb0baa0c728117d2e6764d00414"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename T&gt;<br />
class QwtSeriesData&lt; T &gt;</h3>

<p>Abstract interface for iterating over samples. </p>
<p>Qwt offers several implementations of the <a class="el" href="class_qwt_series_data.html" title="Abstract interface for iterating over samples.">QwtSeriesData</a> API, but in situations, where data of an application specific format needs to be displayed, without having to copy it, it is recommended to implement an individual data access.</p>
<p>A subclass of <a class="el" href="class_qwt_series_data.html">QwtSeriesData&lt;QPointF&gt;</a> must implement:</p>
<ul>
<li><a class="el" href="class_qwt_series_data.html#a3cfe5b26fc55a887ac85b0103ae80a3e">size()</a><br  />
 Should return number of data points.</li>
<li><a class="el" href="class_qwt_series_data.html#ae8650d16c07c58f01897ab48658a3266">sample()</a><br  />
 Should return values x and y values of the sample at specific position as QPointF object.</li>
<li><a class="el" href="class_qwt_series_data.html#aedb969ba51a27d88d26ad7f7cb1c2c7f">boundingRect()</a><br  />
 Should return the bounding rectangle of the data series. It is used for autoscaling and might help certain algorithms for displaying the data. You can use qwtBoundingRect() for an implementation but often it is possible to implement a more efficient algorithm depending on the characteristics of the series. The member d_boundingRect is intended for caching the calculated rectangle. </li>
</ul>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="aedb969ba51a27d88d26ad7f7cb1c2c7f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aedb969ba51a27d88d26ad7f7cb1c2c7f">&#9670;&nbsp;</a></span>boundingRect()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual QRectF <a class="el" href="class_qwt_series_data.html">QwtSeriesData</a>&lt; T &gt;::boundingRect </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Calculate the bounding rect of all samples</p>
<p>The bounding rect is necessary for autoscaling and can be used for a couple of painting optimizations.</p>
<p>qwtBoundingRect(...) offers slow implementations iterating over the samples. For large sets it is recommended to implement something faster f.e. by caching the bounding rectangle.</p>
<dl class="section return"><dt>Returns</dt><dd>Bounding rectangle </dd></dl>

<p>Implemented in <a class="el" href="class_qwt_trading_chart_data.html#a5ace88d32a907e2570a0b4e7fab1bfa4">QwtTradingChartData</a>, <a class="el" href="class_qwt_set_series_data.html#a517acc2c19510ae760de3be09e1025e5">QwtSetSeriesData</a>, <a class="el" href="class_qwt_interval_series_data.html#a54b22d44d2e9ec8e3be10afd337481cd">QwtIntervalSeriesData</a>, <a class="el" href="class_qwt_point3_d_series_data.html#adf2e75191a162d1f917f427f33311375">QwtPoint3DSeriesData</a>, <a class="el" href="class_qwt_point_series_data.html#af30365e69684c7ca5725018b4b837b0e">QwtPointSeriesData</a>, <a class="el" href="class_qwt_synthetic_point_data.html#aff24a4e2fd18c8a022bc1a428c0ccf5d">QwtSyntheticPointData</a>, <a class="el" href="class_qwt_c_pointer_data.html#a92637cf121b0a94a1656d658e90a9f5f">QwtCPointerData</a>, and <a class="el" href="class_qwt_point_array_data.html#acf2e7b6745e1867cf82421bae146671b">QwtPointArrayData</a>.</p>

</div>
</div>
<a id="ae8650d16c07c58f01897ab48658a3266"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae8650d16c07c58f01897ab48658a3266">&#9670;&nbsp;</a></span>sample()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual T <a class="el" href="class_qwt_series_data.html">QwtSeriesData</a>&lt; T &gt;::sample </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>i</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Return a sample </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">i</td><td>Index </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Sample at position i </dd></dl>

<p>Implemented in <a class="el" href="class_qwt_array_series_data.html#a370320fa49b8056656b61f4df79b778b">QwtArraySeriesData&lt; T &gt;</a>, <a class="el" href="class_qwt_array_series_data.html#a370320fa49b8056656b61f4df79b778b">QwtArraySeriesData&lt; QwtIntervalSample &gt;</a>, <a class="el" href="class_qwt_array_series_data.html#a370320fa49b8056656b61f4df79b778b">QwtArraySeriesData&lt; QwtOHLCSample &gt;</a>, <a class="el" href="class_qwt_array_series_data.html#a370320fa49b8056656b61f4df79b778b">QwtArraySeriesData&lt; QPointF &gt;</a>, <a class="el" href="class_qwt_array_series_data.html#a370320fa49b8056656b61f4df79b778b">QwtArraySeriesData&lt; QwtPoint3D &gt;</a>, <a class="el" href="class_qwt_array_series_data.html#a370320fa49b8056656b61f4df79b778b">QwtArraySeriesData&lt; QwtSetSample &gt;</a>, <a class="el" href="class_qwt_synthetic_point_data.html#ac8be76b9c09c80fec51c978ad020aaec">QwtSyntheticPointData</a>, <a class="el" href="class_qwt_c_pointer_data.html#a7e6e149f5eadd13dd9ed5e1343f09527">QwtCPointerData</a>, and <a class="el" href="class_qwt_point_array_data.html#a10885ad1783151831a11f1cc659a98c5">QwtPointArrayData</a>.</p>

</div>
</div>
<a id="a391b4601a7454b2f9582fbc2662d108e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a391b4601a7454b2f9582fbc2662d108e">&#9670;&nbsp;</a></span>setRectOfInterest()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_qwt_series_data.html">QwtSeriesData</a>&lt; T &gt;::setRectOfInterest </td>
          <td>(</td>
          <td class="paramtype">const QRectF &amp;&#160;</td>
          <td class="paramname"><em>rect</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set a the "rect of interest"</p>
<p><a class="el" href="class_qwt_plot_series_item.html" title="Base class for plot items representing a series of samples.">QwtPlotSeriesItem</a> defines the current area of the plot canvas as "rectangle of interest" ( <a class="el" href="class_qwt_plot_series_item.html#a890792d0f44e341812b5283c249608b2" title="Update the item to changes of the axes scale division.">QwtPlotSeriesItem::updateScaleDiv()</a> ). It can be used to implement different levels of details.</p>
<p>The default implementation does nothing.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rect</td><td>Rectangle of interest </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented in <a class="el" href="class_qwt_synthetic_point_data.html#a39cc8512e7d8beecde003f7781174b84">QwtSyntheticPointData</a>.</p>

</div>
</div>
<a id="a3cfe5b26fc55a887ac85b0103ae80a3e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3cfe5b26fc55a887ac85b0103ae80a3e">&#9670;&nbsp;</a></span>size()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t <a class="el" href="class_qwt_series_data.html">QwtSeriesData</a>&lt; T &gt;::size </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>Number of samples </dd></dl>

<p>Implemented in <a class="el" href="class_qwt_array_series_data.html#ab6cf4d74d9c429bd0479572659534cce">QwtArraySeriesData&lt; T &gt;</a>, <a class="el" href="class_qwt_array_series_data.html#ab6cf4d74d9c429bd0479572659534cce">QwtArraySeriesData&lt; QwtIntervalSample &gt;</a>, <a class="el" href="class_qwt_array_series_data.html#ab6cf4d74d9c429bd0479572659534cce">QwtArraySeriesData&lt; QwtOHLCSample &gt;</a>, <a class="el" href="class_qwt_array_series_data.html#ab6cf4d74d9c429bd0479572659534cce">QwtArraySeriesData&lt; QPointF &gt;</a>, <a class="el" href="class_qwt_array_series_data.html#ab6cf4d74d9c429bd0479572659534cce">QwtArraySeriesData&lt; QwtPoint3D &gt;</a>, <a class="el" href="class_qwt_array_series_data.html#ab6cf4d74d9c429bd0479572659534cce">QwtArraySeriesData&lt; QwtSetSample &gt;</a>, <a class="el" href="class_qwt_synthetic_point_data.html#a44e4aedcd2eae58e57811c1458ef17a2">QwtSyntheticPointData</a>, <a class="el" href="class_qwt_c_pointer_data.html#aa8f1b8d366e873bbeac9f1edb21e5ced">QwtCPointerData</a>, and <a class="el" href="class_qwt_point_array_data.html#afe27e8d28457c5f33df5a03109f58a14">QwtPointArrayData</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_qwt_series_data.html">QwtSeriesData</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.16 </li>
  </ul>
</div>
</body>
</html>
